<?php
namespace app\daifast\controller; 
 

class Upload extends \think\Controller
{
    public function index(){ 
     
       $filePath = request()->file('img')->move(ROOT_PATH . 'public' . DS . 'uploads')->getSaveName();
       $filePath = str_replace("\\", "/", $filePath); 
       echojson('OK', 1,$filePath);
      
    }
     
    
}
